package top.mingtea.propertymannagement.service;

import org.springframework.stereotype.Service;
import top.mingtea.propertymannagement.mapper.HouseMapper;
import top.mingtea.propertymannagement.pojo.House;

import java.util.List;

@Service
public class HouseService {
    private final HouseMapper houseMapper;

    public HouseService(HouseMapper houseMapper) {
        this.houseMapper = houseMapper;
    }

    public List<House> getAll() {
        return houseMapper.getAll();
    }

    public void add(House house) {
        houseMapper.add(house);
    }

    public void remove(int house_id) {
        houseMapper.remove(house_id);
    }

    public void update(House house) {
        houseMapper.update(house);
    }
}
